/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
}

/* 黑夜模式基础背景与容器覆盖 */
.dark-mode {
  background-color: #0f0f0f !important;
}
.dark-mode .ant-layout {
  background: #0f0f0f !important;
}
.dark-mode .ant-layout-header {
  background: #1c1c1c !important;
  color: #ddd !important;
}
.dark-mode .ant-layout-content {
  background: #141414 !important;
  color: #ddd !important;
}
.dark-mode .ant-card,
.dark-mode .ant-table,
.dark-mode .ant-modal-content,
.dark-mode .ant-drawer-content,
.dark-mode .ant-form,
.dark-mode .ant-select-dropdown {
  background: #141414 !important;
}
.dark-mode .ant-typography,
.dark-mode .ant-table,
.dark-mode .ant-form-item-label > label {
  color: #ddd !important;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* Ant Design 样式覆盖 */
.ant-input-affix-wrapper {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
  font-size: 14px;
}

.ant-input-affix-wrapper:focus,
.ant-input-affix-wrapper-focused {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ant-input-affix-wrapper:hover {
  border-color: #667eea;
}

.ant-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.ant-btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.ant-btn-primary:active {
  transform: translateY(0);
}

.ant-checkbox-checked .ant-checkbox-inner {
  background-color: #667eea;
  border-color: #667eea;
}

.ant-checkbox:hover .ant-checkbox-inner {
  border-color: #667eea;
}

.ant-checkbox-wrapper:hover .ant-checkbox-inner {
  border-color: #667eea;
}

.ant-message-notice-content {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 全局工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.d-flex {
  display: flex;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

.flex-column {
  flex-direction: column;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.p-1 {
  padding: 8px;
}

.p-2 {
  padding: 16px;
}

.p-3 {
  padding: 24px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 响应式工具类 */
@media (max-width: 768px) {
  .d-md-none {
    display: none;
  }
}

@media (max-width: 576px) {
  .d-sm-none {
    display: none;
  }
}
